From: Matthias Clasen Date: Mon, 18 Jul 2022 11:59:39 +0000 (-0500) Subject: css: Fix handling of transform values X-Git-Tag: archive/raspbian/4.8.3+ds-2+rpi1~3^2~81^2^2~46^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6ef39682270685a078f292f1f2e02b0a90f9c399;p=gtk4.git css: Fix handling of transform values When computing a transform value, there is nothing to do, but we still need to copy the matrix from src to dest, since it depends on the other transforms in the array whether we are using the src or the dest in the end. This fixes cases like -gtk-icon-transform: perspective(100px) matrix(1,2,...); which would otherwise end up with a zero matrix. --- diff --git a/gtk/gtkcsstransformvalue.c b/gtk/gtkcsstransformvalue.c index 0b59cdee87..636fd553cf 100644 --- a/gtk/gtkcsstransformvalue.c +++ b/gtk/gtkcsstransformvalue.c @@ -287,6 +287,7 @@ gtk_css_transform_compute (GtkCssTransform *dest, switch (src->type) { case GTK_CSS_TRANSFORM_MATRIX: + memcpy (dest, src, sizeof (GtkCssTransform)); return TRUE; case GTK_CSS_TRANSFORM_TRANSLATE: dest->translate.x = _gtk_css_value_compute (src->translate.x, property_id, provider, style, parent_style);